package p270jp.pxv.android.fragment;

import android.content.ComponentCallbacks;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.ViewModelStore;
import androidx.recyclerview.widget.GridLayoutManager;
import java.util.List;
import java.util.Objects;
import p014ae.View$OnClickListenerC0151s;
import p045be.LiveGiftingItemAdapter;
import p047bg.C1124a;
import p064c6.Preconditions;
import p134ei.AnalyticsAction;
import p134ei.PixivAnalytics;
import p165fo.C3114c;
import p165fo.Subscribe;
import p189gn.AbstractC3435a;
import p189gn.AbstractC3446l;
import p216hn.Lambda;
import p216hn.Reflection;
import p270jp.pxv.android.R;
import p270jp.pxv.android.event.SendGiftingItemEvent;
import p270jp.pxv.android.model.pixiv_sketch.LiveErrorHandleType;
import p270jp.pxv.android.model.pixiv_sketch.SketchLiveGiftingItem;
import p294ko.ViewModelOwner;
import p314lg.FragmentGiftSelectBottomSheetBinding;
import p325m0.MutabilityOwnership;
import p371nj.LiveAction;
import p371nj.LiveActionCreator;
import p371nj.LiveErrorStore;
import p371nj.LiveGiftState;
import p371nj.LiveGiftStore;
import p371nj.LiveInfoState;
import p371nj.LiveInfoStore;
import p371nj.LivePointStore;
import p467rd.subscribers;
import p547uh.Hilt_GiftSelectBottomSheetFragment;
import p579vo.Qualifier;
import p603wm.AbstractC6949c;
import p603wm.Unit;
import p645yc.AndroidSchedulers;
import p653yk.PixivPointStore;
import p671zc.CompositeDisposable;
import p671zc.Disposable;

/* compiled from: GiftSelectBottomSheetFragment.kt */
/* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment */
/* loaded from: classes2.dex */
public final class GiftSelectBottomSheetFragment extends Hilt_GiftSelectBottomSheetFragment {

    /* renamed from: o */
    public static final /* synthetic */ int f18984o;

    /* renamed from: g */
    public FragmentGiftSelectBottomSheetBinding f18986g;

    /* renamed from: h */
    public long f18987h;

    /* renamed from: f */
    public final CompositeDisposable f18985f = new CompositeDisposable();

    /* renamed from: i */
    public final AbstractC6949c f18988i = Preconditions.m9802P(3, new C4221l(this, null, null, new C4220k(this), null));

    /* renamed from: j */
    public final AbstractC6949c f18989j = Preconditions.m9802P(3, new C4223n(this, null, null, new C4222m(this), null));

    /* renamed from: k */
    public final AbstractC6949c f18990k = Preconditions.m9802P(3, new C4225p(this, null, null, new C4224o(this), null));

    /* renamed from: l */
    public final AbstractC6949c f18991l = Preconditions.m9802P(3, new C4227r(this, null, null, new C4226q(this), null));

    /* renamed from: m */
    public final AbstractC6949c f18992m = Preconditions.m9802P(3, new C4219j(this, null, null, new C4228s(this), null));

    /* renamed from: n */
    public final AbstractC6949c f18993n = Preconditions.m9802P(1, new C4218i(this, null, null));

    /* compiled from: SharedViewModelExt.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$a */
    /* loaded from: classes2.dex */
    public static final class C4210a extends Lambda implements AbstractC3435a<ViewModelOwner> {

        /* renamed from: a */
        public final /* synthetic */ Fragment f18994a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4210a(Fragment fragment) {
            super(0);
            this.f18994a = fragment;
        }

        @Override // p189gn.AbstractC3435a
        public ViewModelOwner invoke() {
            FragmentActivity requireActivity = this.f18994a.requireActivity();
            MutabilityOwnership.m3746l(requireActivity, "requireActivity()");
            FragmentActivity requireActivity2 = this.f18994a.requireActivity();
            ViewModelStore viewModelStore = requireActivity.getViewModelStore();
            MutabilityOwnership.m3746l(viewModelStore, "storeOwner.viewModelStore");
            return new ViewModelOwner(viewModelStore, requireActivity2);
        }
    }

    /* compiled from: GiftSelectBottomSheetFragment.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$b */
    /* loaded from: classes2.dex */
    public static final class C4211b extends GridLayoutManager.AbstractC0780c {

        /* renamed from: c */
        public final /* synthetic */ LiveGiftingItemAdapter f18995c;

        public C4211b(LiveGiftingItemAdapter i0Var) {
            this.f18995c = i0Var;
        }

        @Override // androidx.recyclerview.widget.GridLayoutManager.AbstractC0780c
        /* renamed from: c */
        public int mo1424c(int i) {
            LiveGiftingItemAdapter i0Var = this.f18995c;
            int e = i0Var.mo1392e(i);
            if (e == 2 || e == 3 || e == 5 || e == 7) {
                return 1;
            }
            return i0Var.f4717d;
        }
    }

    /* compiled from: GiftSelectBottomSheetFragment.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$c */
    /* loaded from: classes2.dex */
    public static final class C4212c extends Lambda implements AbstractC3446l<LiveGiftState, Unit> {

        /* renamed from: a */
        public final /* synthetic */ LiveGiftingItemAdapter f18996a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4212c(LiveGiftingItemAdapter i0Var) {
            super(1);
            this.f18996a = i0Var;
        }

        @Override // p189gn.AbstractC3446l
        public Unit invoke(LiveGiftState nVar) {
            LiveGiftState nVar2 = nVar;
            LiveGiftingItemAdapter i0Var = this.f18996a;
            List<SketchLiveGiftingItem> list = nVar2.f23922c;
            Objects.requireNonNull(i0Var);
            MutabilityOwnership.m3745m(list, "items");
            i0Var.f4719f = list;
            LiveGiftingItemAdapter i0Var2 = this.f18996a;
            i0Var2.f4720g = nVar2.f23923d;
            List<SketchLiveGiftingItem> list2 = nVar2.f23921b;
            MutabilityOwnership.m3745m(list2, "items");
            i0Var2.f4721h = list2;
            LiveGiftingItemAdapter i0Var3 = this.f18996a;
            List<SketchLiveGiftingItem> list3 = nVar2.f23920a;
            Objects.requireNonNull(i0Var3);
            MutabilityOwnership.m3745m(list3, "items");
            i0Var3.f4722i = list3;
            this.f18996a.f3606a.m10780b();
            return Unit.f29503a;
        }
    }

    /* compiled from: GiftSelectBottomSheetFragment.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$d */
    /* loaded from: classes2.dex */
    public static final class C4213d extends Lambda implements AbstractC3446l<Long, Unit> {
        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4213d() {
            super(1);
            GiftSelectBottomSheetFragment.this = r1;
        }

        @Override // p189gn.AbstractC3446l
        public Unit invoke(Long l) {
            Long l2 = l;
            GiftSelectBottomSheetFragment giftSelectBottomSheetFragment = GiftSelectBottomSheetFragment.this;
            MutabilityOwnership.m3746l(l2, "it");
            giftSelectBottomSheetFragment.f18987h = l2.longValue();
            GiftSelectBottomSheetFragment giftSelectBottomSheetFragment2 = GiftSelectBottomSheetFragment.this;
            String string = giftSelectBottomSheetFragment2.getString(R.string.point_suffix, Preconditions.m9814D(giftSelectBottomSheetFragment2.f18987h));
            MutabilityOwnership.m3746l(string, "getString(jp.pxv.android…s.formatPointText(point))");
            GiftSelectBottomSheetFragment giftSelectBottomSheetFragment3 = GiftSelectBottomSheetFragment.this;
            FragmentGiftSelectBottomSheetBinding g3Var = giftSelectBottomSheetFragment3.f18986g;
            if (g3Var != null) {
                g3Var.f21607r.setText(giftSelectBottomSheetFragment3.getString(R.string.live_gift_point_suffix, string));
                return Unit.f29503a;
            }
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
    }

    /* compiled from: GiftSelectBottomSheetFragment.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$e */
    /* loaded from: classes2.dex */
    public static final class C4214e extends Lambda implements AbstractC3446l<LiveInfoState, Unit> {
        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4214e() {
            super(1);
            GiftSelectBottomSheetFragment.this = r1;
        }

        @Override // p189gn.AbstractC3446l
        public Unit invoke(LiveInfoState pVar) {
            if (pVar.f23939k) {
                GiftSelectBottomSheetFragment.this.dismissAllowingStateLoss();
            }
            return Unit.f29503a;
        }
    }

    /* compiled from: GiftSelectBottomSheetFragment.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$f */
    /* loaded from: classes2.dex */
    public static final class C4215f extends Lambda implements AbstractC3446l<Unit, Unit> {
        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4215f() {
            super(1);
            GiftSelectBottomSheetFragment.this = r1;
        }

        @Override // p189gn.AbstractC3446l
        public Unit invoke(Unit jVar) {
            GiftSelectBottomSheetFragment.m4618g(GiftSelectBottomSheetFragment.this).m3352k();
            return Unit.f29503a;
        }
    }

    /* compiled from: GiftSelectBottomSheetFragment.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$g */
    /* loaded from: classes2.dex */
    public static final class C4216g extends Lambda implements AbstractC3446l<LiveErrorHandleType, Unit> {

        /* renamed from: b */
        public final /* synthetic */ String f19001b;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4216g(String str) {
            super(1);
            GiftSelectBottomSheetFragment.this = r1;
            this.f19001b = str;
        }

        @Override // p189gn.AbstractC3446l
        public Unit invoke(LiveErrorHandleType liveErrorHandleType) {
            LiveErrorHandleType liveErrorHandleType2 = liveErrorHandleType;
            MutabilityOwnership.m3745m(liveErrorHandleType2, "it");
            if (liveErrorHandleType2 instanceof LiveErrorHandleType.RetryGiftSelectViewPropertiesFetch) {
                GiftSelectBottomSheetFragment.m4618g(GiftSelectBottomSheetFragment.this).m3357f(this.f19001b, 8);
            } else if (liveErrorHandleType2 instanceof LiveErrorHandleType.RetryPointFetch) {
                GiftSelectBottomSheetFragment.m4618g(GiftSelectBottomSheetFragment.this).m3352k();
            } else if (liveErrorHandleType2 instanceof LiveErrorHandleType.CloseGiftSelectView) {
                GiftSelectBottomSheetFragment.this.dismiss();
            } else if (liveErrorHandleType2 instanceof LiveErrorHandleType.ClosePointDisplayViews) {
                GiftSelectBottomSheetFragment.this.dismiss();
            }
            return Unit.f29503a;
        }
    }

    /* compiled from: GiftSelectBottomSheetFragment.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$h */
    /* loaded from: classes2.dex */
    public static final class C4217h extends Lambda implements AbstractC3435a<Unit> {
        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4217h() {
            super(0);
            GiftSelectBottomSheetFragment.this = r1;
        }

        @Override // p189gn.AbstractC3435a
        public Unit invoke() {
            GiftSelectBottomSheetFragment.this.dismiss();
            GiftSelectBottomSheetFragment.m4618g(GiftSelectBottomSheetFragment.this).f23822c.mo2437b(new LiveAction.C5329z(true));
            return Unit.f29503a;
        }
    }

    /* compiled from: ComponentCallbackExt.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$i */
    /* loaded from: classes2.dex */
    public static final class C4218i extends Lambda implements AbstractC3435a<PixivAnalytics> {

        /* renamed from: a */
        public final /* synthetic */ ComponentCallbacks f19003a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4218i(ComponentCallbacks componentCallbacks, Qualifier aVar, AbstractC3435a aVar2) {
            super(0);
            this.f19003a = componentCallbacks;
        }

        /* JADX WARN: Type inference failed for: r0v4, types: [ei.e, java.lang.Object] */
        @Override // p189gn.AbstractC3435a
        public final PixivAnalytics invoke() {
            return C1124a.m10173s(this.f19003a).f24118a.m920a().m621a(Reflection.m5499a(PixivAnalytics.class), null, null);
        }
    }

    /* compiled from: SharedViewModelExt.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$j */
    /* loaded from: classes2.dex */
    public static final class C4219j extends Lambda implements AbstractC3435a<LiveErrorStore> {

        /* renamed from: a */
        public final /* synthetic */ Fragment f19004a;

        /* renamed from: b */
        public final /* synthetic */ AbstractC3435a f19005b;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4219j(Fragment fragment, Qualifier aVar, AbstractC3435a aVar2, AbstractC3435a aVar3, AbstractC3435a aVar4) {
            super(0);
            this.f19004a = fragment;
            this.f19005b = aVar3;
        }

        /* JADX WARN: Type inference failed for: r0v1, types: [androidx.lifecycle.j0, nj.m] */
        @Override // p189gn.AbstractC3435a
        public LiveErrorStore invoke() {
            return C1124a.m10172t(this.f19004a, null, null, this.f19005b, Reflection.m5499a(LiveErrorStore.class), null);
        }
    }

    /* compiled from: SharedViewModelExt.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$k */
    /* loaded from: classes2.dex */
    public static final class C4220k extends Lambda implements AbstractC3435a<ViewModelOwner> {

        /* renamed from: a */
        public final /* synthetic */ Fragment f19006a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4220k(Fragment fragment) {
            super(0);
            this.f19006a = fragment;
        }

        @Override // p189gn.AbstractC3435a
        public ViewModelOwner invoke() {
            FragmentActivity requireActivity = this.f19006a.requireActivity();
            MutabilityOwnership.m3746l(requireActivity, "requireActivity()");
            FragmentActivity requireActivity2 = this.f19006a.requireActivity();
            ViewModelStore viewModelStore = requireActivity.getViewModelStore();
            MutabilityOwnership.m3746l(viewModelStore, "storeOwner.viewModelStore");
            return new ViewModelOwner(viewModelStore, requireActivity2);
        }
    }

    /* compiled from: SharedViewModelExt.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$l */
    /* loaded from: classes2.dex */
    public static final class C4221l extends Lambda implements AbstractC3435a<LiveActionCreator> {

        /* renamed from: a */
        public final /* synthetic */ Fragment f19007a;

        /* renamed from: b */
        public final /* synthetic */ AbstractC3435a f19008b;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4221l(Fragment fragment, Qualifier aVar, AbstractC3435a aVar2, AbstractC3435a aVar3, AbstractC3435a aVar4) {
            super(0);
            this.f19007a = fragment;
            this.f19008b = aVar3;
        }

        /* JADX WARN: Type inference failed for: r0v1, types: [androidx.lifecycle.j0, nj.b] */
        @Override // p189gn.AbstractC3435a
        public LiveActionCreator invoke() {
            return C1124a.m10172t(this.f19007a, null, null, this.f19008b, Reflection.m5499a(LiveActionCreator.class), null);
        }
    }

    /* compiled from: SharedViewModelExt.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$m */
    /* loaded from: classes2.dex */
    public static final class C4222m extends Lambda implements AbstractC3435a<ViewModelOwner> {

        /* renamed from: a */
        public final /* synthetic */ Fragment f19009a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4222m(Fragment fragment) {
            super(0);
            this.f19009a = fragment;
        }

        @Override // p189gn.AbstractC3435a
        public ViewModelOwner invoke() {
            FragmentActivity requireActivity = this.f19009a.requireActivity();
            MutabilityOwnership.m3746l(requireActivity, "requireActivity()");
            FragmentActivity requireActivity2 = this.f19009a.requireActivity();
            ViewModelStore viewModelStore = requireActivity.getViewModelStore();
            MutabilityOwnership.m3746l(viewModelStore, "storeOwner.viewModelStore");
            return new ViewModelOwner(viewModelStore, requireActivity2);
        }
    }

    /* compiled from: SharedViewModelExt.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$n */
    /* loaded from: classes2.dex */
    public static final class C4223n extends Lambda implements AbstractC3435a<LiveGiftStore> {

        /* renamed from: a */
        public final /* synthetic */ Fragment f19010a;

        /* renamed from: b */
        public final /* synthetic */ AbstractC3435a f19011b;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4223n(Fragment fragment, Qualifier aVar, AbstractC3435a aVar2, AbstractC3435a aVar3, AbstractC3435a aVar4) {
            super(0);
            this.f19010a = fragment;
            this.f19011b = aVar3;
        }

        /* JADX WARN: Type inference failed for: r0v1, types: [androidx.lifecycle.j0, nj.o] */
        @Override // p189gn.AbstractC3435a
        public LiveGiftStore invoke() {
            return C1124a.m10172t(this.f19010a, null, null, this.f19011b, Reflection.m5499a(LiveGiftStore.class), null);
        }
    }

    /* compiled from: SharedViewModelExt.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$o */
    /* loaded from: classes2.dex */
    public static final class C4224o extends Lambda implements AbstractC3435a<ViewModelOwner> {

        /* renamed from: a */
        public final /* synthetic */ Fragment f19012a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4224o(Fragment fragment) {
            super(0);
            this.f19012a = fragment;
        }

        @Override // p189gn.AbstractC3435a
        public ViewModelOwner invoke() {
            FragmentActivity requireActivity = this.f19012a.requireActivity();
            MutabilityOwnership.m3746l(requireActivity, "requireActivity()");
            FragmentActivity requireActivity2 = this.f19012a.requireActivity();
            ViewModelStore viewModelStore = requireActivity.getViewModelStore();
            MutabilityOwnership.m3746l(viewModelStore, "storeOwner.viewModelStore");
            return new ViewModelOwner(viewModelStore, requireActivity2);
        }
    }

    /* compiled from: SharedViewModelExt.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$p */
    /* loaded from: classes2.dex */
    public static final class C4225p extends Lambda implements AbstractC3435a<LiveInfoStore> {

        /* renamed from: a */
        public final /* synthetic */ Fragment f19013a;

        /* renamed from: b */
        public final /* synthetic */ AbstractC3435a f19014b;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4225p(Fragment fragment, Qualifier aVar, AbstractC3435a aVar2, AbstractC3435a aVar3, AbstractC3435a aVar4) {
            super(0);
            this.f19013a = fragment;
            this.f19014b = aVar3;
        }

        /* JADX WARN: Type inference failed for: r0v1, types: [androidx.lifecycle.j0, nj.q] */
        @Override // p189gn.AbstractC3435a
        public LiveInfoStore invoke() {
            return C1124a.m10172t(this.f19013a, null, null, this.f19014b, Reflection.m5499a(LiveInfoStore.class), null);
        }
    }

    /* compiled from: SharedViewModelExt.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$q */
    /* loaded from: classes2.dex */
    public static final class C4226q extends Lambda implements AbstractC3435a<ViewModelOwner> {

        /* renamed from: a */
        public final /* synthetic */ Fragment f19015a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4226q(Fragment fragment) {
            super(0);
            this.f19015a = fragment;
        }

        @Override // p189gn.AbstractC3435a
        public ViewModelOwner invoke() {
            FragmentActivity requireActivity = this.f19015a.requireActivity();
            MutabilityOwnership.m3746l(requireActivity, "requireActivity()");
            FragmentActivity requireActivity2 = this.f19015a.requireActivity();
            ViewModelStore viewModelStore = requireActivity.getViewModelStore();
            MutabilityOwnership.m3746l(viewModelStore, "storeOwner.viewModelStore");
            return new ViewModelOwner(viewModelStore, requireActivity2);
        }
    }

    /* compiled from: SharedViewModelExt.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$r */
    /* loaded from: classes2.dex */
    public static final class C4227r extends Lambda implements AbstractC3435a<LivePointStore> {

        /* renamed from: a */
        public final /* synthetic */ Fragment f19016a;

        /* renamed from: b */
        public final /* synthetic */ AbstractC3435a f19017b;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4227r(Fragment fragment, Qualifier aVar, AbstractC3435a aVar2, AbstractC3435a aVar3, AbstractC3435a aVar4) {
            super(0);
            this.f19016a = fragment;
            this.f19017b = aVar3;
        }

        /* JADX WARN: Type inference failed for: r0v1, types: [androidx.lifecycle.j0, nj.r] */
        @Override // p189gn.AbstractC3435a
        public LivePointStore invoke() {
            return C1124a.m10172t(this.f19016a, null, null, this.f19017b, Reflection.m5499a(LivePointStore.class), null);
        }
    }

    /* compiled from: SharedViewModelExt.kt */
    /* renamed from: jp.pxv.android.fragment.GiftSelectBottomSheetFragment$s */
    /* loaded from: classes2.dex */
    public static final class C4228s extends Lambda implements AbstractC3435a<ViewModelOwner> {

        /* renamed from: a */
        public final /* synthetic */ Fragment f19018a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4228s(Fragment fragment) {
            super(0);
            this.f19018a = fragment;
        }

        @Override // p189gn.AbstractC3435a
        public ViewModelOwner invoke() {
            FragmentActivity requireActivity = this.f19018a.requireActivity();
            MutabilityOwnership.m3746l(requireActivity, "requireActivity()");
            FragmentActivity requireActivity2 = this.f19018a.requireActivity();
            ViewModelStore viewModelStore = requireActivity.getViewModelStore();
            MutabilityOwnership.m3746l(viewModelStore, "storeOwner.viewModelStore");
            return new ViewModelOwner(viewModelStore, requireActivity2);
        }
    }

    /* renamed from: g */
    public static final LiveActionCreator m4618g(GiftSelectBottomSheetFragment giftSelectBottomSheetFragment) {
        return (LiveActionCreator) giftSelectBottomSheetFragment.f18988i.getValue();
    }

    @Override // androidx.fragment.app.Fragment
    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        MutabilityOwnership.m3745m(layoutInflater, "inflater");
        ViewDataBinding c = DataBindingUtil.m11370c(layoutInflater, R.layout.fragment_gift_select_bottom_sheet, viewGroup, false);
        MutabilityOwnership.m3746l(c, "inflate(inflater, R.layo…_sheet, container, false)");
        this.f18986g = (FragmentGiftSelectBottomSheetBinding) c;
        String string = requireArguments().getString("args_live_id");
        if (string != null) {
            LiveGiftingItemAdapter i0Var = new LiveGiftingItemAdapter(8, new C4217h());
            GiftSelectBottomSheetFragment$onCreateView$layoutManager$1 giftSelectBottomSheetFragment$onCreateView$layoutManager$1 = new GiftSelectBottomSheetFragment$onCreateView$layoutManager$1(getContext());
            FragmentGiftSelectBottomSheetBinding g3Var = this.f18986g;
            if (g3Var != null) {
                g3Var.f21608s.setLayoutManager(giftSelectBottomSheetFragment$onCreateView$layoutManager$1);
                giftSelectBottomSheetFragment$onCreateView$layoutManager$1.f3458K = new C4211b(i0Var);
                FragmentGiftSelectBottomSheetBinding g3Var2 = this.f18986g;
                if (g3Var2 != null) {
                    g3Var2.f21608s.setAdapter(i0Var);
                    FragmentGiftSelectBottomSheetBinding g3Var3 = this.f18986g;
                    if (g3Var3 != null) {
                        g3Var3.f21608s.setHasFixedSize(true);
                        FragmentGiftSelectBottomSheetBinding g3Var4 = this.f18986g;
                        if (g3Var4 != null) {
                            g3Var4.f21608s.setItemViewCacheSize(40);
                            FragmentGiftSelectBottomSheetBinding g3Var5 = this.f18986g;
                            if (g3Var5 != null) {
                                g3Var5.f21608s.setDrawingCacheEnabled(true);
                                FragmentGiftSelectBottomSheetBinding g3Var6 = this.f18986g;
                                if (g3Var6 != null) {
                                    g3Var6.f21608s.setDrawingCacheQuality(1048576);
                                    FragmentGiftSelectBottomSheetBinding g3Var7 = this.f18986g;
                                    if (g3Var7 != null) {
                                        g3Var7.f21606q.setOnClickListener(new View$OnClickListenerC0151s(this, 13));
                                        Disposable g = subscribers.m2589g(((LiveGiftStore) this.f18989j.getValue()).f23928e.m986o(AndroidSchedulers.m334a()), null, null, new C4212c(i0Var), 3);
                                        CompositeDisposable aVar = this.f18985f;
                                        MutabilityOwnership.m3744n(aVar, "compositeDisposable");
                                        aVar.mo82c(g);
                                        Disposable g2 = subscribers.m2589g(((LivePointStore) this.f18991l.getValue()).f23963e.m986o(AndroidSchedulers.m334a()), null, null, new C4213d(), 3);
                                        CompositeDisposable aVar2 = this.f18985f;
                                        MutabilityOwnership.m3744n(aVar2, "compositeDisposable");
                                        aVar2.mo82c(g2);
                                        Disposable g3 = subscribers.m2589g(((LiveInfoStore) this.f18990k.getValue()).f23952e.m986o(AndroidSchedulers.m334a()), null, null, new C4214e(), 3);
                                        CompositeDisposable aVar3 = this.f18985f;
                                        MutabilityOwnership.m3744n(aVar3, "compositeDisposable");
                                        aVar3.mo82c(g3);
                                        Disposable g4 = subscribers.m2589g(((PixivPointStore) C1124a.m10172t(this, null, null, new C4210a(this), Reflection.m5499a(PixivPointStore.class), null)).f30915e.m986o(AndroidSchedulers.m334a()), null, null, new C4215f(), 3);
                                        CompositeDisposable aVar4 = this.f18985f;
                                        MutabilityOwnership.m3744n(aVar4, "compositeDisposable");
                                        aVar4.mo82c(g4);
                                        Disposable g5 = subscribers.m2589g(((LiveErrorStore) this.f18992m.getValue()).f23918g, null, null, new C4216g(string), 3);
                                        CompositeDisposable aVar5 = this.f18985f;
                                        MutabilityOwnership.m3744n(aVar5, "compositeDisposable");
                                        aVar5.mo82c(g5);
                                        ((LiveActionCreator) this.f18988i.getValue()).m3357f(string, 8);
                                        ((PixivAnalytics) this.f18993n.getValue()).m6527c(19, AnalyticsAction.YELL_MODAL_OPEN, string);
                                        FragmentGiftSelectBottomSheetBinding g3Var8 = this.f18986g;
                                        if (g3Var8 != null) {
                                            return g3Var8.f2666e;
                                        }
                                        MutabilityOwnership.m3737u("binding");
                                        throw null;
                                    }
                                    MutabilityOwnership.m3737u("binding");
                                    throw null;
                                }
                                MutabilityOwnership.m3737u("binding");
                                throw null;
                            }
                            MutabilityOwnership.m3737u("binding");
                            throw null;
                        }
                        MutabilityOwnership.m3737u("binding");
                        throw null;
                    }
                    MutabilityOwnership.m3737u("binding");
                    throw null;
                }
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
        throw new IllegalArgumentException("createInstanceでFragmentが生成されていない可能性がある".toString());
    }

    @Override // androidx.fragment.app.Fragment
    public void onDestroy() {
        super.onDestroy();
        this.f18985f.m80f();
    }

    @Subscribe
    public final void onEvent(SendGiftingItemEvent sendGiftingItemEvent) {
        MutabilityOwnership.m3745m(sendGiftingItemEvent, "event");
        dismiss();
    }

    @Override // androidx.fragment.app.Fragment
    public void onPause() {
        super.onPause();
        C3114c.m6284b().m6274l(this);
    }

    @Override // androidx.fragment.app.Fragment
    public void onResume() {
        super.onResume();
        C3114c.m6284b().m6276j(this);
    }
}
